<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Hard
  </div>
  <div>
   <h1 class="question_title">
    37. Sudoku Solver
   </h1>
   <p>
    Write a program to solve a Sudoku puzzle by filling the empty cells.
   </p>
   <p>
    A&nbsp;sudoku solution must satisfy
    <strong>
     all of&nbsp;the following rules
    </strong>
    :
   </p>
   <ol>
    <li>
     Each of the digits&nbsp;
     <code>
      1-9
     </code>
     must occur exactly&nbsp;once in each row.
    </li>
    <li>
     Each of the digits&nbsp;
     <code>
      1-9
     </code>
     &nbsp;must occur&nbsp;exactly once in each column.
    </li>
    <li>
     Each of the the digits&nbsp;
     <code>
      1-9
     </code>
     must occur exactly once in each of the 9
     <code>
      3x3
     </code>
     sub-boxes of the grid.
    </li>
   </ol>
   <p>
    Empty cells are indicated by the character
    <code>
     '.'
    </code>
    .
   </p>
   <p>
    <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png" style="height:250px; width:250px">
    <br>
    <small>
     A sudoku puzzle...
    </small>
   </p>
   <p>
    <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Sudoku-by-L2G-20050714_solution.svg/250px-Sudoku-by-L2G-20050714_solution.svg.png" style="height:250px; width:250px">
    <br>
    <small>
     ...and its solution numbers marked in red.
    </small>
   </p>
   <p>
    <strong>
     Note:
    </strong>
   </p>
   <ul>
    <li>
     The given board&nbsp;contain only digits
     <code>
      1-9
     </code>
     and the character
     <code>
      '.'
     </code>
     .
    </li>
    <li>
     You may assume that the given Sudoku puzzle will have a single unique solution.
    </li>
    <li>
     The given board size is always
     <code>
      9x9
     </code>
     .
    </li>
   </ul>
  </div>
  <div>
   <h1 class="question_title">
    37. 解数独
   </h1>
   <p>
    编写一个程序，通过已填充的空格来解决数独问题。
   </p>
   <p>
    一个数独的解法需
    <strong>
     遵循如下规则
    </strong>
    ：
   </p>
   <ol>
    <li>
     数字&nbsp;
     <code>
      1-9
     </code>
     &nbsp;在每一行只能出现一次。
    </li>
    <li>
     数字&nbsp;
     <code>
      1-9
     </code>
     &nbsp;在每一列只能出现一次。
    </li>
    <li>
     数字&nbsp;
     <code>
      1-9
     </code>
     &nbsp;在每一个以粗实线分隔的&nbsp;
     <code>
      3x3
     </code>
     &nbsp;宫内只能出现一次。
    </li>
   </ol>
   <p>
    空白格用&nbsp;
    <code>
     '.'
    </code>
    &nbsp;表示。
   </p>
   <p>
    <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Sudoku-by-L2G-20050714.svg/250px-Sudoku-by-L2G-20050714.svg.png">
   </p>
   <p>
    <small>
     一个数独。
    </small>
   </p>
   <p>
    <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Sudoku-by-L2G-20050714_solution.svg/250px-Sudoku-by-L2G-20050714_solution.svg.png">
   </p>
   <p>
    <small>
     答案被标成红色。
    </small>
   </p>
   <p>
    <strong>
     Note:
    </strong>
   </p>
   <ul>
    <li>
     给定的数独序列只包含数字&nbsp;
     <code>
      1-9
     </code>
     &nbsp;和字符&nbsp;
     <code>
      '.'
     </code>
     &nbsp;。
    </li>
    <li>
     你可以假设给定的数独只有唯一解。
    </li>
    <li>
     给定数独永远是&nbsp;
     <code>
      9x9
     </code>
     &nbsp;形式的。
    </li>
   </ul>
  </div>
 </body>
</html>